-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: feat(position): Add function to place an overlay #102
base: master
Are you sure you want to change the base?
Conversation
Addresses #65 and charmbracelet/bubbletea#79 |
This is quite neat and useful. Are you @buztard working on improving this for merging? |
What would need to be improved here for this to become mergable? @muesli @meowgorithm It would be super useful to have this for the time being until an actual compositor becomes available. |
Ooo. |
Hey, Marius! If this is something you need immediately I'd suggest simply moving the code here to a separate repo (or adding directly to your project). It's just string manipulation in the end and should be pretty straightforward. Otherwise, we're could potentially merge this after vetting performance a bit and, more importantly, making sure it works properly with double-width runes (which I'm sure you can appreciate). |
Hey Christian! Did exactly that, works like a Charm! Had to copypasta a few internals though, but it's okay for now. Would nevertheless be cool to have it officially available. :-) |
Noted! In the meantime, @mrusme, I'd love to hear if you encounter any problems with the implementation (or if everything is awesome). |
@mrusme The overlay one is nifty. Any idea how to make it work with https://github.com/lrstanley/bubblezone markers? @meowgorithm Overlay code works great, but not using those bubblezone markers from what I can tell. Edit: After further test, it seems that essentially markers won't work properly when using the Overlay functionality. I do zone.Mark and zone.Scan, and it works. As soon as I use the .PlaceOverlay function, those markers don't work properly anymore. |
Is this functionality going to be merged into lipgloss? Or is it going to be tackled as part of the "larger initiative" mentioned here: charmbracelet/bubbletea#169 (comment)? @meowgorithm
I've been using this |
Is there any update on getting this merged? This is exactly what I need for solving the problem I was asking about in #288, and it would be an extremely helpful feature to have in general in Lip Gloss. Thanks! |
any new progress? |
Hi all. So just an update here: while this is an excellent implementation (well done @buztard) we're working on a more thorough solution internally as part of a larger initiative. There's no ETA, but it's being actively worked on. Given that, we don't plan on merging this PR. In the meantime, as I've mentioned, if you need this functionality immediately I'd suggest moving the code into your own project and it's fairly compact and easy to move around. |
I found https://pkg.go.dev/github.com/charmbracelet/x/ansi. https://gist.github.com/ras0q/9bf5d81544b22302393f61206892e2cd |
This is just a quick POC I made the other day. Needs cleanup, proper testing, relative placement using
lipgloss.Position
and the ability to place the overlay outside of the background box, but so far it works as expected.